using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Super;

public class RadarController : MonoBehaviour
{
    public RadarMap radarMap;
    public RadarFG.ForegroundType foregroundType;
    public float length;
    public float offsetRotate;
    [Range(0, 1)]
    public List<float> points = new List<float>();

    public void OnValidate()
    {
        InitRadar();
        RefreshRadar();
    }

    public void Start()
    {
        InitRadar();
        RefreshRadar();
    }

    public void InitRadar()
    {
        radarMap.Init(length, offsetRotate, foregroundType);
    }

    public void RefreshRadar()
    {
        radarMap.Refresh(points);
    }
}
